<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>粘滞定位</title>
    <link rel="stylesheet" href="../day06/common.css">
    <style>
        .top {
            height: 60px;
            background-color: #333;
            font-size: 28px;
            color: #fff;
            text-align: center;
            line-height: 60px;
        }
        
        .nav {
            width: 100%;
            height: 68px;
            background-color: teal;
            color: #fff;
            font-size: 28px;
            text-align: center;
            line-height: 68px;
            position: sticky;
            top: 0px;
        }
    </style>
</head>

<body>
    <div class="top">top</div>
    <div class="nav">nav</div>
    <div style="height: 1000px;"></div>
</body>

</html>